﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class DodjaKsiedza : Form
    {
        Form2 F;
        public DodjaKsiedza(Form2 F)
        {
            this.F = F;
            InitializeComponent();
        }

        private void DodjaKsiedza_Load(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string wyn = " INSERT INTO ksieza (Imię, Nazwisko, Pesel, Stanowisko, Data_Początku, Data_Końca, Miejsce_Pracy) ";
            wyn += "Values ( ";
            wyn += "\'" + textBox1.Text + "\', ";
            wyn += "\'" + textBox2.Text + "\', ";
            wyn += "\'" + textBox3.Text + "\', ";
            wyn += "\'" + textBox4.Text + "\', ";
            wyn += "\'" + textBox5.Text + "\', ";
            wyn += "\'" + textBox6.Text + "\', ";
            wyn += " " + textBox7.Text + " ";
            wyn += ");";
            BazaDaych.Wykonaj(wyn);
            F.pokazwszystko();
            this.Close();
        }
    }
}
